package com.zt.dev.common.exception;

import com.zt.dev.common.ServerResponse;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author 30378
 * 全局异常处理
 */
@ControllerAdvice
public class GlobalException {

    @ExceptionHandler(Exception.class)
    public ServerResponse error(){
        return ServerResponse.createByError();
    }
}
